{include file="$temps.head" title="$webs.title" keywords="$webs.keywords" description="$webs.description" /}
<form class="layui-form" action="{:url('edit_user')}" method="post">
<ul class="layout fex-column bg-fff user-ziliao-ul">
    <li class="layout cx-fex-c pad-t10">
        <h3>基本信息</h3>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">会员名</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" class="ipt" disabled="disabled" value="{$cxbsuser.username}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">微信名</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" disabled="disabled" class="ipt" value="{$cxbsuser.uniname}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">E-mail</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" name="uemail" placeholder="请输入E-mail" class="ipt" value="{$cxbsuser.uemail|default=''}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">真实姓名</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" name="uname" placeholder="请输入真实姓名" class="ipt username" value="{$cxbsuser.uname|default=''}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">联系手机</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" name="uphone" placeholder="请输入联系手机" class="ipt userphone" value="{$cxbsuser.uphone|default=''}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10 pad-b15">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">联系地址</label>
            </div>
            <div class="xs8 xl9">
                <input id="addresbtn" type="text" name="uaddress" placeholder="请输入联系地址" class="ipt useraddress" value="{$cxbsuser.uaddress|default=''}">
            </div>
        </div>
    </li>
</ul>
<ul class="layout fex-column bg-fff user-ziliao-ul mt-20">
    <li class="layout cx-fex-c pad-t10">
        <h3>选填信息</h3>
    </li>
    <li class="layout cx-fex-c pad-t10">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">联系QQ</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" name="uicq" placeholder="请输入联系QQ" class="ipt" value="{$cxbsuser.uicq|default=''}">
            </div>
        </div>
    </li>
    <li class="layout cx-fex-c pad-t10 pad-b15">
        <div class="xl11 cx-fex-l">
            <div class="x3">
                <label class="lab">身份证号</label>
            </div>
            <div class="xs8 xl9">
                <input type="text" name="ucard" placeholder="请输入身份证号" class="ipt" value="{$cxbsuser.ucard|default=''}">
            </div>
        </div>
    </li>
</ul>
<div class="layout cx-fex-c mt-20">
    <input type="hidden" name="uid" required="" lay-verify="required" class="ipt" value="{$cxbsuser.uid|default=''}">
    <button class="button bg-blue" lay-submit lay-filter="">提交修改</button>
</div>
</form>
<div style="width: 100%;height: 80px; display: block;"></div>
<script>
    wx.config({
        appId: '{$webdb.wxappid}', // 必填，公众号的唯一标识
        timestamp: '{$wxjsapi.timestamp}', // 必填，生成签名的时间戳
        nonceStr: '{$wxjsapi.noncestr}', // 必填，生成签名的随机串
        signature: '{$wxjsapi.sing}',// 必填，签名
        jsApiList: [
            'openAddress',
        ] // 必填，需要使用的JS接口列表
    });
    wx.ready(function(){
        {empty name='cxbsuser.uaddress'}
        wx.openAddress({
            success: function (res) {
                var seeuser = res.provinceName + " " + res.cityName + " " + res.countryName + " " + res.detailInfo;
                $(".useraddress").val(seeuser);
                $(".username").val(res.userName);
                $(".userphone").val(res.telNumber);
            }
        });
        {/empty}
            document.querySelector('#addresbtn').onclick = function () {
                wx.openAddress({
                    success: function (res) {
                        var seeuser = res.provinceName + " " + res.cityName + " " + res.countryName + " " + res.detailInfo;
                        $(".useraddress").val(seeuser);
                        $(".username").val(res.userName);
                        $(".userphone").val(res.telNumber);
                    }
                });
            };
        });
    wx.checkJsApi({
        jsApiList: ['onMenuShareAppMessage'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
        success: function(res) {

        }
    });
</script>
{include file="$temps.foot" /}